<!DOCTYPE >
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
	</head>

	<body>
		<script type="text/javascript">
			//求最大值
			var num1 = 20,
				num2 = 40,
				num3 = 100;
			if (num1 > num2 && num1 > num3) {
				console.log(num1);
			} else if (num2 > num1 && num2 > num3) {
				console.log(num2);
			} else {
				console.log(num3);
			}
		</script>
	</body>

</html>
